home *** CD-ROM | disk | FTP | other *** search
- * Program : Sets the current directory
- * Author : Stephen McNabb
- * Creation date : 15th February 1995
- * Last update : 15th February 1995
- * Parameters : Address of directory name
- * Output : A negative value will be returned in d0 if
- * the directory can not be changed
-
- start: jsr cls /clear the screen
- move.l #direct,-(sp) /move address of directory name to stack
- move.w #$3B,-(sp) /use Dsetpath() function
- trap #1 /use gemdos
- addq.l #6,sp /tidy up stack
-
- cmpi.b #0,d0 /check to see if there was an error
- blt err /if there is display an error message
-
- move.l #success,d0 /else move address of success message into d0
- bra skip /and skip the next line
- err: move.l #error,d0 /move address of error message into d0
- skip: jsr ptext /display message on screen
-
- end: bra exit /exit from program
-
- include "\SOURCE\FUNCTION.S" /include standard functions
-
-
- *** Program Data ***
-
- direct: dc.b '\TEST\',0
- success:dc.b 'Current directory changed',0
- error: dc.b 'Error!',0
-
- *** End of file ***